@extends("admin.layout.main")

@section("css")
    <link rel="stylesheet" href="/adstatic/moneyreport/moneyReport.css" media="all" />
@endsection

@section("content")
    <blockquote class="layui-elem-quote news_search">
        <div class="layui-inline">
            <div class="layui-input-inline">
                <input type="text" value="{{$querystr}}" class="layui-input search_input">
            </div>
            <a class="layui-btn search_btn">查询</a>
            <a href="/moneyReport" class="layui-btn">重置</a>
            <span>注：支持"用户名"和"金额"搜索！</span>
        </div>
    </blockquote>
    <div class="layui-form users_list">
        <table class="layui-table" id="table">
            <colgroup>
                <col width="">
                <col>
                <col width="">
                <col >
                <col >
                <col width="">
                <col width="">
            </colgroup>
            <thead>
            <tr>
                <th>用户名</th>
                <th>类型</th>
                <th>金额</th>
                <th>贡献者</th>
                <th>创建时间</th>
                <th>更新时间</th>
                <th>状态</th>
                <th>备注</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody class="users_content">
            @foreach ($datas as $data)
                <tr data-id="{{ $data->id }}">
                    <td>{{ $data->name }}</td>
                    <td>
                        @if($data->types==1)
                            建点奖
                        @elseif($data->types==2)
                            层碰奖
                        @elseif($data->types==3)
                            培育奖
                        @elseif($data->types==4)
                            量碰奖
                        @else
                            提现
                        @endif
                    </td>
                    <td>{{ $data->amount }}</td>
                    <td>
                        {{$data->types==5?'':$data->providerName->name }}
                    </td>
                    <td>{{date('Y-m-d H:i:s',$data->create_time)}}</td>
                    <td>{{$data->update_time?date('Y-m-d H:i:s',$data->update_time):'暂无'}}</td>
                    <td>
                        @switch($data->status)
                            @case(1)
                                验证成功
                                @break
                            @case(2)
                                验证中...
                                @break
                            @case(3)
                                验证失败
                                @break
                            @default
                                未验证
                        @endswitch
                    </td>
                    <td>{{ $data->remark }}</td>
                    <td>
                        <a class="layui-btn layui-btn-danger layui-btn-mini delete_report">
                            <i class="layui-icon">&#xe642;</i>
                            删除
                        </a>
                    </td>
                </tr>
            @endforeach
            </tbody>
        </table>
    </div>
    <div style="text-align: right;">
        {{ $datas->appends(['querystr'=>$querystr])->links('admin.layout.paginate') }}
    </div>

@endsection

@section("js")

    <script type="text/javascript" src="/adstatic/moneyreport/moneyReport.js"></script>
@endsection
